<div class="blazorise-codeblock">
<div class="csharp"><pre>
<span class="keyword">public</span> <span class="keyword">class</span> Employee
{
    [Required]
    <span class="keyword">public</span> <span class="keyword">string</span> FirstName { <span class="keyword">get</span>; <span class="keyword">set</span>; }

    [Required]
    <span class="keyword">public</span> <span class="keyword">string</span> LastName { <span class="keyword">get</span>; <span class="keyword">set</span>; }

    [Required]
    [EmailAddress]
    <span class="keyword">public</span> <span class="keyword">string</span> Email { <span class="keyword">get</span>; <span class="keyword">set</span>; }

    [Required]
    <span class="keyword">public</span> <span class="keyword">string</span> Gender { <span class="keyword">get</span>; <span class="keyword">set</span>; }

    [Required]
    <span class="keyword">public</span> DateTime? DateOfBirth { <span class="keyword">get</span>; <span class="keyword">set</span>; }

    [Required]
    <span class="keyword">public</span> <span class="keyword">decimal</span>? YearsOfExperience { <span class="keyword">get</span>; <span class="keyword">set</span>; }

    <span class="keyword">public</span> Address Address { <span class="keyword">get</span>; <span class="keyword">set</span>; } = <span class="keyword">new</span> Address();
}

<span class="keyword">public</span> <span class="keyword">class</span> Address
{
    [Required]
    <span class="keyword">public</span> <span class="keyword">string</span> Street { <span class="keyword">get</span>; <span class="keyword">set</span>; }

    [Required]
    <span class="keyword">public</span> <span class="keyword">string</span> City { <span class="keyword">get</span>; <span class="keyword">set</span>; }

    [Required]
    <span class="keyword">public</span> <span class="keyword">string</span> Zip { <span class="keyword">get</span>; <span class="keyword">set</span>; }

    [Required]
    <span class="keyword">public</span> <span class="keyword">string</span> Country { <span class="keyword">get</span>; <span class="keyword">set</span>; }
}

<span class="keyword">public</span> <span class="keyword">class</span> Country
{
    <span class="keyword">public</span> <span class="keyword">string</span> Name { <span class="keyword">get</span>; <span class="keyword">set</span>; }

    <span class="keyword">public</span> <span class="keyword">string</span> Code { <span class="keyword">get</span>; <span class="keyword">set</span>; }

    <span class="keyword">public</span> <span class="keyword">static</span> IEnumerable&lt;Country&gt; GetCountries()
    {
        <span class="keyword">return</span> <span class="keyword">new</span> List&lt;Country&gt;
        {
            <span class="keyword">new</span>() { Name = <span class="string">&quot;Croatia&quot;</span>, Code = <span class="string">&quot;HR&quot;</span> },
            <span class="keyword">new</span>() { Name = <span class="string">&quot;United Kingdom&quot;</span>, Code = <span class="string">&quot;UK&quot;</span> },
            <span class="keyword">new</span>() { Name = <span class="string">&quot;United States&quot;</span>, Code = <span class="string">&quot;US&quot;</span> },
        };
    }
}

<span class="keyword">public</span> <span class="keyword">class</span> City
{
    <span class="keyword">public</span> <span class="keyword">string</span> Name { <span class="keyword">get</span>; <span class="keyword">set</span>; }

    <span class="keyword">public</span> <span class="keyword">string</span> Code { <span class="keyword">get</span>; <span class="keyword">set</span>; }

    <span class="keyword">public</span> <span class="keyword">string</span> CountryCode { <span class="keyword">get</span>; <span class="keyword">set</span>; }

    <span class="keyword">public</span> <span class="keyword">static</span> IEnumerable&lt;City&gt; GetCities()
    {
        <span class="keyword">return</span> <span class="keyword">new</span> List&lt;City&gt;
        {
            <span class="keyword">new</span>() { Name = <span class="string">&quot;San Francisco&quot;</span>, CountryCode = <span class="string">&quot;US&quot;</span>, Code=<span class="string">&quot;US-101&quot;</span> },
            <span class="keyword">new</span>() { Name = <span class="string">&quot;Los Angeles&quot;</span>, CountryCode = <span class="string">&quot;US&quot;</span>, Code=<span class="string">&quot;US-102&quot;</span> },
            <span class="keyword">new</span>() { Name = <span class="string">&quot;Boston&quot;</span>, CountryCode = <span class="string">&quot;US&quot;</span>, Code=<span class="string">&quot;US-103&quot;</span> },
            <span class="keyword">new</span>() { Name = <span class="string">&quot;Portland&quot;</span>, CountryCode = <span class="string">&quot;US&quot;</span>, Code=<span class="string">&quot;US-104&quot;</span> },
            <span class="keyword">new</span>() { Name = <span class="string">&quot;Split&quot;</span>, CountryCode = <span class="string">&quot;HR&quot;</span>, Code=<span class="string">&quot;HR-101&quot;</span> },
            <span class="keyword">new</span>() { Name = <span class="string">&quot;Zagreb&quot;</span>, CountryCode = <span class="string">&quot;HR&quot;</span>, Code=<span class="string">&quot;HR-102&quot;</span> },
            <span class="keyword">new</span>() { Name = <span class="string">&quot;Dubrovnik&quot;</span>, CountryCode = <span class="string">&quot;HR&quot;</span>, Code=<span class="string">&quot;HR-103&quot;</span> },
            <span class="keyword">new</span>() { Name = <span class="string">&quot;London&quot;</span>, CountryCode = <span class="string">&quot;UK&quot;</span>, Code=<span class="string">&quot;UK-101&quot;</span> },
            <span class="keyword">new</span>() { Name = <span class="string">&quot;Glasgow&quot;</span>, CountryCode = <span class="string">&quot;UK&quot;</span>, Code=<span class="string">&quot;UK-102&quot;</span> },
            <span class="keyword">new</span>() { Name = <span class="string">&quot;Liverpool&quot;</span>, CountryCode = <span class="string">&quot;UK&quot;</span>, Code=<span class="string">&quot;UK-103&quot;</span> }
        };
    }
}

<span class="keyword">public</span> <span class="keyword">class</span> Gender
{
    <span class="keyword">public</span> <span class="keyword">string</span> Name { <span class="keyword">get</span>; <span class="keyword">set</span>; }

    <span class="keyword">public</span> <span class="keyword">string</span> Code { <span class="keyword">get</span>; <span class="keyword">set</span>; }

    <span class="keyword">public</span> <span class="keyword">static</span> IEnumerable&lt;Gender&gt; GetGenders()
    {
        <span class="keyword">return</span> <span class="keyword">new</span> List&lt;Gender&gt;
        {
            <span class="keyword">new</span>() { Name = <span class="string">&quot;Male&quot;</span>, Code = <span class="string">&quot;A&quot;</span> },
            <span class="keyword">new</span>() { Name = <span class="string">&quot;Female&quot;</span>, Code = <span class="string">&quot;B&quot;</span> },
            <span class="keyword">new</span>() { Name = <span class="string">&quot;Non-binary&quot;</span>, Code = <span class="string">&quot;C&quot;</span> },
            <span class="keyword">new</span>() { Name = <span class="string">&quot;Transgender&quot;</span>, Code = <span class="string">&quot;D&quot;</span> },
            <span class="keyword">new</span>() { Name = <span class="string">&quot;Intersex&quot;</span>, Code = <span class="string">&quot;E&quot;</span> },
            <span class="keyword">new</span>() { Name = <span class="string">&quot;I prefer not to say&quot;</span>, Code = <span class="string">&quot;F&quot;</span> },
        };
    }
}
</pre></div>
</div>
